// Scoring M2M

#ifndef __ScoringM2M_H__
#define __ScoringM2M_H__

#include <Profile.h>
#include <ScoringFunction.h>
#include <ScoringScheme.h>

namespace Biopool
{

class ScoringM2M : public ScoringScheme
{

public:

// CONSTRUCTORS:

	/// Default constructor.
	ScoringM2M(SubMatrix *sub, AlignmentData *ad, Structure *str, Profile *pro1,
		Profile *pro2, ScoringFunction *fun, double cSeq);

	/// Copy constructor.
	ScoringM2M(const ScoringM2M &orig);

	/// Destructor.
	virtual ~ScoringM2M();


// OPERATORS:

	/// Assignment operator.
	ScoringM2M& operator = (const ScoringM2M &orig);


// PREDICATES:

	/// Calculate scores to create matrix values.
	virtual double scoring(int i, int j);


// MODIFIERS:

	/// Copy orig object to this object ("deep copy").
	virtual void copy(const ScoringM2M &orig);

	/// Construct a new "deep copy" of this object.
	virtual ScoringM2M* newCopy();

	/// Reverse template sequence and profile.
	virtual void reverse();


protected:


private:

// ATTRIBUTES:

	string seq1;             ///< Target sequence.
	string seq2;             ///< Template sequence.
	Profile *pro1;           ///< Target profile.
	Profile *pro2;           ///< Template profile.
	ScoringFunction *fun;    ///< Scoring function.
	double cSeq;             ///< Coefficient for sequence alignment.

};

} // namespace

#endif
